<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var value = window.prompt("输入你的年龄");
        if(value>18){
            alert("能进网吧");
        }else{
            alert("回家好好学习！");
        }
        // var result=window.prompt("请输入你的星座","狮子座");
        // console.log(result);

    </script>
</body>
</html>